1. Field of the Invention
The present invention relates to the field of data delivery in a computer network system and, in particular, to a method and apparatus for managing memory buffers for network device drivers.
Portions of the disclosure of this patent document contain material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office file or records, but otherwise reserves all copyright rights whatsoever.
Sun, Sun Microsystems, the Sun logo, Solaris and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries. All SPARC trademarks are used under license and are trademarks of SPARC International, Inc., in the United States and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.
2. Background Art
Recent years have witnessed exponential growth in networking technologies such as Fast Ethernet, Gigabit Ethernet, and Asynchronous Transfer Mode (ATM), which have significantly increased the speed and bandwidth of computer networks. Newer and newer technologies have evolved which are capable of delivering data upwards of one Gigabit per second (Gbps). As networks continue to evolve and new technologies arise, it has become apparent that although networks are capable of delivering data at high rate, the operating system (especially the network device drivers) of the host machine is incapable of delivering that data to the application layer with the same speed and efficiency. It has been reported that the typical network device driver (e.g., the Gigabit Ethernet or GE driver) is not able to provide a sustainable speed beyond 350 MBPS (i.e., 35% of theoretical 1 Gbps that it is supposed to sustain). Thus, the operating systems of a computer network system have become a bottleneck in terms of high performance.
In a typical operating system of a network host machine (such as the Sun Solaris Operating System), network data is delivered to the application layer through a modular subsystem. In the subsystem, data is passed from one module to another with the help of a standard message block. As per the current implementation, one of the modules comprises a network device driver. The network device driver assembles a standard message block for an incoming data packet. The subsystem then fills the data packet into the message block. Once the message block has been filled up with the data packet, the driver then passes the message block to the next module in the subsystem. Once the subsystem delivers the data in the message block to the application layer, the subsystem destroys that message block. The process of creating a standard message block and then destroying that message block for each and every received data packet is found to consume a lot of Central Processing Unit (CPU) resources. This results in a severe penalty in performance of the host system.
Accordingly, it would be advantageous and desirable to provide a method and apparatus that eliminate the need for repeated construction/destruction of a standard message block for each and every received data packet.
The present invention manages memory buffers in network device drivers in a flexible operating system (e.g., the Solaris operating system) that increases performance of the operating system at a high throughput with no detriment to the flexible nature of the operating system. In accordance with the teachings of the present invention, a standard message block is extended so that it does not have to be destroyed when the processing of its corresponding data packet is completed. The extended message block can be reused to carry another data packet. Thus, by eliminating the need to create a standard message block, and to bind/unbind (with direct memory access (DMA) handlers) and destroy that message block for each and every data packet (regardless of how small or large that packet is), the present invention greatly improves the efficiency and speed of data processing within a computer network system.
In one embodiment of the present invention, a computer network system includes a network for transmitting a data packet, a first module for receiving the packet, and a second module for processing the data packet. The first module is connected with the network. An operating system is connected with the first and second modules. A message block is used to carry the data packet from the first module to the second module. The message block is assembled by a network device driver module within the operating system and can be reused to carry another data packet from the first module to the second module upon delivery of the data packet to the second module.
In another embodiment of the present invention, a method is developed for managing memory buffers in a computer network system. In this method, a data packet is received from a network. A message block is then assembled for the data packet. The data packet is then filled into the message block. The filled message block is then carried within a network subsystem until the data packet has been delivered to an application layer. The message block is then used to carry another data packet.
In a further embodiment of the present invention, a computer network system includes a network for transmitting a data packet and an operating system having a modular subsystem. A message block is used to carry the data packet within the modular subsystem. A network device driver module within the modular subsystem is used to assemble the message block. An application layer is connected with the network via the operating system. The message block contains an extension that allows the message block to carry another data packet upon delivery of the data packet to the application layer, and the data packet is delivered to the application layer through the subsystem.
A more complete understanding of the present invention, as well as a realization of additional advantages and objects thereof, will be afforded to those skilled in the art by a consideration of the following detailed description of the embodiment. Reference will be made to the appended sheets of drawings which will first be described briefly.